using Digitalmes.Domain.Entities.Mes.Masters;

namespace Digitalmes.Domain.Entities.Mes.Equipments;

/// <summary>
/// 设备点检标件
/// </summary>
[SugarTable("equip_inspection_standard_parts")]
public sealed class EquipInspectionStandardParts : AuditedEntity
{
    /// <summary>
    /// 标准件编号
    /// </summary>
    [NotNull]
    public string? StandardPartNo { get; set; }

    /// <summary>
    /// 标准件名称
    /// </summary>
    [NotNull]
    public string? StandardPartName { get; set; }

    /// <summary>
    /// 用于要检测的产线 Id（唯一）
    /// </summary>
    public long LineId { get; set; }

    [Navigate(NavigateType.OneToOne, nameof(LineId))]
    public MdLine? Line { get; set; }

    /// <summary>
    /// 用于要检测的工位 Id 集合。
    /// </summary>
    [NotNull]
    [SugarColumn(IsJson = true)]
    public long[]? WorkstationIds { get; set; }

    /// <summary>
    /// 描述
    /// </summary>
    public string? Remark { get; set; }

    /// <summary>
    /// 启用状态（0->停用，1->启用）
    /// </summary>
    public EnabledStatusEnum Status { get; set; }
}
